function H_z,redshift,Omega0,OmegaLambda,H0
@physunits
; assumes H0 in km/s / Mpc
if(H0 LT 10) then print,' -warning, expects H0 (km/s / Mpc) rather than h'
H_z = H0*sqrt(Omega0*(1.+redshift)^3 + OmegaLambda)
; convert into /s
H_z_cgs = H_z*1.0e5/Mpc
t_H     = 1.0 / H_z_cgs / (1.0e9*yr)
str = create_struct('redshift',redshift,'HubbleParameter',H_z,'HubbleTime',t_H)
return,str
end
